home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / t_unix / j109lxa4.tar / nntp.h < prev    next >
C/C++ Source or Header  |  1994-06-04  |  2KB  |  220 lines

  1. #ifndef _NNTP_H
  2.  
  3. #define _NNTP_H
  4.  
  5.  
  6.  
  7. #ifndef _GLOBAL_H
  8.  
  9. #include "global.h"
  10.  
  11. #endif
  12.  
  13.  
  14.  
  15. #ifndef _SMTP_H
  16.  
  17. #include "smtp.h"
  18.  
  19. #endif
  20.  
  21.  
  22.  
  23. struct nntpsv {
  24.  
  25.     int s;
  26.  
  27.     int ret;
  28.  
  29.     int debug;
  30.  
  31.     int slave;
  32.  
  33.     unsigned  first;
  34.  
  35.     unsigned  last;
  36.  
  37.     unsigned  pointer;
  38.  
  39.     unsigned  hold_i;
  40.  
  41.  
  42.  
  43.     char buf[512];
  44.  
  45.     char history[512];
  46.  
  47.     char *newnews;
  48.  
  49.     char *path;
  50.  
  51.     char *fname;
  52.  
  53.     char *id;
  54.  
  55.     FILE *ihave;
  56.  
  57.     int32 dest;
  58.  
  59.     int32 unixtime;
  60.  
  61.     long ftime;
  62.  
  63.     struct date *datest;
  64.  
  65.     struct time *timest;
  66.  
  67.  
  68.  
  69.     struct article *ap;
  70.  
  71. };
  72.  
  73. #define NULLNNTPSV (struct nntpsv *)0
  74.  
  75.  
  76.  
  77. struct article {
  78.  
  79.     char *group;
  80.  
  81.     char *id;
  82.  
  83.     char *path;
  84.  
  85.     unsigned number;
  86.  
  87.     unsigned tmpu;
  88.  
  89.     struct article *next;
  90.  
  91. };
  92.  
  93. #define NULLARTICLE (struct article *)0
  94.  
  95.  
  96.  
  97. struct post {
  98.  
  99.     char *user;
  100.  
  101.     char *reply;
  102.  
  103.     char *sig;
  104.  
  105.     char *organ;
  106.  
  107.     char *fullname;
  108.  
  109. };
  110.  
  111. #define NULLPOST (struct post *)0
  112.  
  113.  
  114.  
  115. struct groups {
  116.  
  117.     struct article *a;
  118.  
  119.     struct article *next;
  120.  
  121. };
  122.  
  123. #define NULLGROUP (struct groups *)0
  124.  
  125.  
  126.  
  127. struct head {
  128.  
  129.     char *from;
  130.  
  131.     char *reply_to;
  132.  
  133.     char *subject;
  134.  
  135.     char *id;
  136.  
  137. };
  138.  
  139. #define NULLHEAD (struct head *)0
  140.  
  141.  
  142.  
  143. struct g_list {
  144.  
  145.     char *str;
  146.  
  147.     struct g_list *next;
  148.  
  149. };
  150.  
  151. #define NULLG (struct g_list *)0
  152.  
  153.  
  154.  
  155. struct search {
  156.  
  157.     struct g_list *not;
  158.  
  159.     struct g_list *all;
  160.  
  161.     struct g_list *group;
  162.  
  163. };
  164.  
  165. #define NULLSEARCH (struct search *)0
  166.  
  167.  
  168.  
  169. struct DFREE {
  170.  
  171.     unsigned char drive;
  172.  
  173.     unsigned long bytes;
  174.  
  175.     struct DFREE *next;
  176.  
  177. };
  178.  
  179. #define NULLDRV (struct DFREE *)0
  180.  
  181.  
  182.  
  183. struct Servers {
  184.  
  185.     struct timer nntpt;
  186.  
  187.     char *name;
  188.  
  189.     int32 dest;
  190.  
  191.     char *newsgroups;       /* list of newsgroups */
  192.  
  193.     int lowtime;            /* for connect window */
  194.  
  195.     int hightime;
  196.  
  197.     struct Servers *next;
  198.  
  199. };
  200.  
  201. #define NULLSERVER (struct Servers *)0
  202.  
  203.  
  204.  
  205. #define LineLen 512
  206.  
  207.  
  208.  
  209. int    nntp1     __ARGS((int argc, char *argv[], void *p));
  210.  
  211. int nntp0     __ARGS((int argc, char *argv[], void *p));
  212.  
  213. int donntp     __ARGS((int argc, char *argv[], void *p));
  214.  
  215. int nnGpost __ARGS((FILE *data,char *from,struct list *le));
  216.  
  217.  
  218.  
  219. #endif /* _NNTP_H */
  220.